// by Xeno

private ["_vec", "_state"];

_vec = _this select 0;
_state = _this select 3;

switch (_state) do {
	case 0: {
		d_chophud_on = false;
		_act_id = (player getVariable "d_hud_id");
		if (!isnil "_act_id") then {
			_vec removeAction _act_id;
		};
		player SetVariable ["d_hud_id", (_vec addAction [localize "MSG_DOM_VECHUDON" call XGreyText, "client\sethud.sqf",1,-1,false])];
	};
	case 1: {
		d_chophud_on = true;
		_act_id = (player getVariable "d_hud_id");
		if (!isnil "_act_id") then {
			_vec removeAction _act_id;
		};
		player SetVariable ["d_hud_id", (_vec addAction [localize "MSG_DOM_VECHUDOFF" call XGreyText, "client\sethud.sqf",0,-1,false])];
	};
};